package com.kk.hellospringbootstarter.config;

import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.core.annotation.Order;

import java.util.logging.Logger;

/**
 * @program: springboot-autoconfig
 * @description:
 * @author: Mr.Dai
 * @create: 2020-03-02 16:32
 **/
@AutoConfigureOrder(0)
public class PersonService {

    private final Logger logger=Logger.getLogger(PersonService.class.getName());

    private PersonProperties personProperties;

    public PersonService setPersonProperties(PersonProperties personProperties) {
        this.personProperties = personProperties;
        return this;
    }

    public void sayHello(){
        logger.info(personProperties.toString());
    }
}
